<?PHP
  class SettingsPage extends Editor{
    function __construct($page){
      $this->page = $page;
    }
  
    public function display(){
        $settings = new SettingsForm();
        $settings->role = 3;
        $settings->url  = Settings::getInstance()->get("host").$_GET['include'].".html";
        if(isset($_GET['areatype'])){
          $settings->areaType = $_GET['areatype'];
        }
        if(isset($_GET['area'])){
          $settings->area = $_GET['area'];
        }
        if(isset($_GET['role'])) $settings->role = $_GET['role'];

        $settings->display();
      ?>
        <div style="margin-left:500px;">
        <h2>Skins</h2>
      <?PHP
        $skins = $GLOBALS['db']->ReadRows("SELECT * FROM {'dbprefix'}skins WHERE LOWER(name) IN (SELECT DISTINCT name FROM {'dbprefix'}settings WHERE areaType = 'skins' AND area = {'dbprefix'}skins.name)");
        if($skins){
          foreach($skins as $skin){
            echo "<a href=\"". Settings::getInstance()->get("host")."admin/settings.html?areatype=skins&area=".urlencode($skin->name)."\">".$skin->name."</a><br />";
          }
        }
      ?>
        <h2>Plugins</h2>
      <?PHP
        $plugins = new PluginList();
        $plugins->loadAll();
        foreach($plugins->plugins as $plugin){
          if($plugin->configurationFile != ''){
            ?>
              <a href="<?PHP echo Settings::getInstance()->get("host"); ?>admin/pluginsettings.html?plugin=<?PHP echo $plugin->path; ?>"><?PHP echo $plugin->name; ?></a><br />
            <?PHP
          }
        }
      ?>
        </div>
      <?PHP
    }
    function getHeader(){
    }
    
    public function getEditableCode(){
      return "<input name=\"save\" type=\"submit\" value=\"&Auml;ndern\" onclick=\"form.action='".$_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING']."' ; target='_self' ; return true\" />";
    }
    
    public function save($newPage,$oldPage){
    }    
}
?>